function [residual, T_order, T] = static_resid(y, x, params, T_order, T)
if nargin < 5
    T_order = -1;
    T = NaN(10, 1);
end
[T_order, T] = M30b.sparse.static_resid_tt(y, x, params, T_order, T);
residual = NaN(10, 1);
    residual(1) = (T(1)*T(4)) - (params(2)*y(5)^params(7)+(params(4)-1)*y(1)/y(5)*T(5));
    residual(2) = (T(5)+params(4)*params(8)*T(4)*params(1)*T(6)) - (T(5)*params(1)*(1-params(3)+params(4)*T(6)));
    residual(3) = (y(10)) - (params(6)-params(8)*(y(1)-params(9)));
    residual(4) = (y(2)+y(4)) - (y(1));
    residual(5) = (y(1)) - (T(7)*exp(y(7))*T(8));
    residual(6) = (y(4)) - (y(3)-y(3)*(1-params(3)));
    residual(7) = (y(6)) - (y(1)/y(5));
    residual(8) = (y(7)) - (y(7)*params(5)+x(1));
    residual(9) = (y(8)) - (T(8)*T(9)-params(3));
    residual(10) = (y(9)) - (T(7)*(1-params(4))*T(10));
end
